package com.example.zhangHuSheZhiPoJi;

import java.util.Objects;

/**
 * @author 。
 * @version 1.0
 * Create by 2022/11/29 20:28
 * 账户信息的封装类
 * 仅仅可以用在账户信息上
 */

public class ZhangHuSheZhiS {
    //用户名
    private String trueName;
    //性别
    private String sex;
    //账号唯一设置
    //用在头像图片的名字
    private String account;
    //头像图片的路径
    private String avatar;
    //邮箱地址
    private String email;
    //密码
    private String password;
    //手机号
    private long phone;
    //个性签名
    private String freestyle;

    @Override
    public String toString() {
        return "ZhangHuSheZhiS{" +
                "trueName='" + trueName + '\'' +
                ", sex='" + sex + '\'' +
                ", account='" + account + '\'' +
                ", avatar='" + avatar + '\'' +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", phone=" + phone +
                ", freestyle='" + freestyle + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZhangHuSheZhiS that = (ZhangHuSheZhiS) o;
        return phone == that.phone &&
                Objects.equals(trueName, that.trueName) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(account, that.account) &&
                Objects.equals(avatar, that.avatar) &&
                Objects.equals(email, that.email) &&
                Objects.equals(password, that.password) &&
                Objects.equals(freestyle, that.freestyle);
    }

    @Override
    public int hashCode() {
        return Objects.hash(trueName, sex, account, avatar, email, password, phone, freestyle);
    }

    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getPhone() {
        return phone;
    }

    public void setPhone(long phone) {
        this.phone = phone;
    }

    public String getFreestyle() {
        return freestyle;
    }

    public void setFreestyle(String freestyle) {
        this.freestyle = freestyle;
    }

    public ZhangHuSheZhiS() {
    }

    public ZhangHuSheZhiS(String trueName, String sex, String account, String avatar, String email, String password, long phone, String freestyle) {
        this.trueName = trueName;
        this.sex = sex;
        this.account = account;
        this.avatar = avatar;
        this.email = email;
        this.password = password;
        this.phone = phone;
        this.freestyle = freestyle;
    }
}
